import SvgIcon from "./SvgIcon/index.vue";
import Pagination from "./Pagination/index.vue";
// 引入图标组件
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import Category from "./Category/index.vue";

const allGloablComponent: any = {
  SvgIcon,
  Pagination,
  Category,
};

// 对外暴露一个插件对象
export default {
  install(app: any) {
    Object.keys(allGloablComponent).forEach((key) => {
      app.component(key, allGloablComponent[key]);
    });
    for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
      app.component(key, component);
    }
  },
};
